/**
 * A file containing some useful macros.
 */

/**
 * These macros, INFO, WARNING, and ERROR, write a message to STDERR along
 * with the function name and line number from which the message was written.
 */
#define INFO(x) std::cerr << "INFO in " << __FUNCTION__ << " on line " << __LINE__ << ": " << x << std::endl
#define WARNING(x) std::cerr << "WARNING in " << __FUNCTION__ << " on line " << __LINE__ << ": " << x << std::endl
#define ERROR(x) std::cerr << "ERROR in " << __FUNCTION__ << " on line " << __LINE__ << ": " << x << std::endl

/**
 * This macro writes the function name and line number to STDERR.
 */
#define WHERE_AM_I std::cerr << "In " << __FUNCTION__ << " on line " << __LINE__ << std::endl

#define DUMP(x) std::cerr << #x << ": " << x << std::endl

/**
 * This macro shows a cv::Mat object in a window.
 */
#define SHOW(x) cv::imshow(#x, x)